<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
      // 1.开始循环
      // 3.准备一个总的金额
    let money = 100
    while (true) {
      let re = +prompt(`请您选择操作：
                            1.存钱
                            2.取钱
                            3.查看余额
                            4.退出 `)
      // 2.用户输入4 退出
      if (re === 4) {
        break
      }
      switch (re) {
        case 1:
          //存钱
          let cun = +prompt('请输入存款金额')
          money += cun
          break
        case 2:
          //取钱
          let qu = +prompt('请输入取款金额')
          money -= qu
          break
        case 3:
          //查钱
          alert(`您的银行卡余额为${money}`)
          break
      }
                              
    }
  </script>
</body>
</html>